<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>emaclite: xemaclite_internal_loopback_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">emaclite
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xemaclite__internal__loopback__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xemaclite_internal_loopback_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a example for using EmacLite hardware and driver. </p>
<p>This file contains an interrupt example outlining the use of interrupts and callbacks in the transmission/reception of Ethernet frames using internal loop back with an incrementing payload from 1 byte to 1500 bytes (excluding Ethernet Header and FCS).</p>
<p>This example assumes that there is an interrupt controller in the hardware system and the EmacLite device is connected to the interrupt controller.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>None</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.01a ecm  05/21/04 First release
1.01a sv   06/06/05 Minor changes to comply to Doxygen and coding guidelines
2.00a ktn  02/25/09 Updated to use internal loop back feature
2.01a ktn  07/20/09 Updated the example to wait for either Transmit complete
                    or Rx packet reception.
3.00a ktn  10/22/09 Updated the example to use the HAL APIs/macros.
              Updated example to use the macros that have been changed
              in the driver to remove _m from the name of the macro.
3.01a ktn  07/08/10 Updated example to support Little Endian MicroBlaze.
4.3   ms   01/23/17 Added xil_printf statement in main function to
                    ensure that "Successfully ran" and "Failed" strings
                    are available in all examples. This is a fix for
                    CR-965028.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a39ebe8c6955e5f51e47ab8495205c62b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xemaclite__internal__loopback__example_8c.html#a39ebe8c6955e5f51e47ab8495205c62b">EmacLiteIntrLoopbackExample</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:a39ebe8c6955e5f51e47ab8495205c62b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main entry point for the EmacLite driver in interrupt mode example.  <a href="#a39ebe8c6955e5f51e47ab8495205c62b">More...</a><br/></td></tr>
<tr class="separator:a39ebe8c6955e5f51e47ab8495205c62b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xemaclite__internal__loopback__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main function of the EmacLite example in interrupt mode.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a39ebe8c6955e5f51e47ab8495205c62b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int EmacLiteIntrLoopbackExample </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The main entry point for the EmacLite driver in interrupt mode example. </p>
<p>This function will transmit/receive the frame using internal loop back and verify the data in the received frame.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is device ID of the <a class="el" href="struct_x_emac_lite.html" title="The XEmacLite driver instance data. ">XEmacLite</a> Device , typically XPAR_&lt;EMAC_instance&gt;_DEVICE_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="struct_x_emac_lite___config.html#abd2e9fc4f5ca6eddbd068f8dd08bad4a">XEmacLite_Config::BaseAddress</a>, <a class="el" href="group__emaclite.html#ga41c8fc68a64b6dfb418a1ac824cc9151">XEL_MTU_SIZE</a>, <a class="el" href="group__emaclite.html#ga3c9dd90e02c987b5b3a1dacdcfd057c4">XEmacLite_CfgInitialize()</a>, <a class="el" href="group__emaclite.html#gacac27172503eee6a171afe1679c20f2c">XEmacLite_DisableInterrupts()</a>, <a class="el" href="group__emaclite.html#ga55c4a0b58c4e35dbf81c4866946f368a">XEmacLite_DisableLoopBack()</a>, <a class="el" href="group__emaclite.html#ga28a0b4547f8b9b8eb675123df8ab8907">XEmacLite_EnableInterrupts()</a>, <a class="el" href="group__emaclite.html#ga1bd8c7361add009208f4c6778644a83c">XEmacLite_EnableLoopBack()</a>, <a class="el" href="group__emaclite.html#gae7ced3b39bd2f06d037660e884c0706b">XEmacLite_FlushReceive()</a>, <a class="el" href="group__emaclite.html#ga72db0e7e81077c3ad3947009a5299fdf">XEmacLite_InterruptHandler()</a>, <a class="el" href="group__emaclite.html#ga9cf5dd9f60336f05a30a7684319a2b1e">XEmacLite_LookupConfig()</a>, <a class="el" href="group__emaclite.html#gaaf404b645896f5fb74e87b4ada362809">XEmacLite_SetMacAddress()</a>, <a class="el" href="group__emaclite.html#ga5bacfdd394bc95a6b34dec438bfad8bf">XEmacLite_SetRecvHandler()</a>, <a class="el" href="group__emaclite.html#ga2e48d33c6b41774f4cb37bffc85f59a1">XEmacLite_SetSendHandler()</a>, and <a class="el" href="group__emaclite.html#ga3f75e1a5a0b8d0e5e085880919ad693a">XEmacLite_TxBufferAvailable()</a>.</p>

<p>Referenced by <a class="el" href="xemaclite__internal__loopback__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main function of the EmacLite example in interrupt mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xemaclite__internal__loopback__example_8c.html#a39ebe8c6955e5f51e47ab8495205c62b">EmacLiteIntrLoopbackExample()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
